package com.zd.service;

import com.zd.config.PageResult;
import com.zd.config.Result;
import com.zd.entity.Admin;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author TSP
 * @since 2021-08-22
 */
public interface IAdminService extends IService<Admin> {
    /**
     * 管理员登录返回token
     *
     * @param username
     * @param password
     * @param request
     * @return
     */
    Result login(String username, String password, HttpServletRequest request);

    /**
     * 根据用户名获取用户信息
     *
     * @param username
     * @return
     */
    Admin getAdminByUserName(String username);

    /**
     * 获取admin的分页数据
     * @param currentPage
     * @param size
     * @return
     */
    PageResult getAllAdminByPage(Integer currentPage, Integer size);
}
